package junit.stringutility;

public class StringUtil {

	public StringUtil() {
		System.out.println("init StringUtil");
	}

	public static String addStrings(String a, String b) {
		if (a == null || b == null) {
			throw new IllegalArgumentException("argument can not be null");
		}
		return a + b;
	}

	public static int getStringLength(String a) {
		if (a == null) {
			throw new IllegalArgumentException("argument can not be null");
		}
		return a.length();
	}

	public static String replaceString(String a, String b, String c) {
		if (a == null || b == null || c == null) {
			throw new IllegalArgumentException("argument can not be null");
		}

		return a.replaceAll(b, c);

	}
}
